package com.wuqing.consumer.controller;

import com.wuqing.consumer.service.UserHelloService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wuqing
 * @date 2020/8/6
 */
@RestController
@RequestMapping("hello")
public class UserHelloController {

    @Resource
    private UserHelloService userHelloService;

    @RequestMapping("/go")
    @ResponseBody
    public String sayHello(@RequestParam String name) {
        return userHelloService.sayHello(name);
    }
}